import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { FormsModule } from '@angular/forms';
import { PageService, WidgetMeta, TranslateI18NextModule} from '@ctaf/framework';
import { ComponentsModule } from '@ctaf/components';
import { WidgetComponent } from './widget.component';
import { locales } from './locales/locales';
import { MedalListComponent } from './components/medal-list/medalList.component';
import { CurrencySwapComponent } from './components/currency-swap/currencySwap.component';
import { CurrencyBorrowComponent } from './components/currency-borrow/currencyBorrow.component';
import { MessageService1Component,MessageService2Component,ForeignExchangeComponent } from './components/foreign-exchange/foreignExchange.component';
import { ForeignExchangeChildComponent } from './components/foreign-exchange/foreign-exchange-child/foreignExchangeChild.component';
@NgModule({
    imports: [CommonModule, FormsModule, ComponentsModule, TranslateI18NextModule],
    exports: [WidgetComponent],
    declarations: [
        WidgetComponent,
        MedalListComponent,
        CurrencySwapComponent,
        CurrencyBorrowComponent,
        ForeignExchangeComponent,
        MessageService1Component,
        MessageService2Component,
        ForeignExchangeChildComponent,
    ],
    bootstrap: [WidgetComponent],
    providers: [],
})
export class WidgetModule {
    public static getTemplate(): string {
        return '<ctaf-wg-widget [h]="12" [w]="12" [x]="0" [y]="0" #component></ctaf-wg-widget>';
    }
    public static selector: string = 'ctaf-wg-widget';
}

PageService.registerCommonWidget(new WidgetMeta('ctaf-wg-widget', 'widgetTitle', WidgetModule, 'Widget', locales));
